package com.moreemrecife.ui;

import java.util.logging.Logger;

import javax.faces.context.FacesContext;

/**
 * Intercept navigation events to log, and verify login.
 */
public class NavigationHandler extends
        javax.faces.application.NavigationHandler {
    Logger logger = Logger.getLogger("com.moreemrecife");

    javax.faces.application.NavigationHandler _base;

    public NavigationHandler(javax.faces.application.NavigationHandler base) {
        super();
        _base = base;
    }

    @Override
    public void handleNavigation(FacesContext fc, String actionMethod,
            String outcome) {

        logger.info("Action Method " + actionMethod + "from View " + fc.getViewRoot().getViewId() + " returned outcome "
                + outcome);
        
        
        _base.handleNavigation(fc, actionMethod, outcome);
    }

}
